package huawei;

/**
 * 运输时间
 */
public class Q128 {

    public static void main(String[] args) {
        int dis = 11;
        int[] speeds = {2,2,3};

        float[] reachTimes = new float[speeds.length];

        for (int i = 0; i < speeds.length; i++) {
            if (i == 0) {
                reachTimes[i] = (float) dis / speeds[i];
            } else {
                float time = ((float) dis / speeds[i]) + i; // 原本到达的时间
                if (time < reachTimes[i - 1]) {
                    reachTimes[i] = reachTimes[i - 1];
                } else {
                    reachTimes[i] = time;
                }
            }
        }

        System.out.println(reachTimes[reachTimes.length - 1] - reachTimes.length + 1);
    }
}
